package com.ccys.db.mapper;

import com.ccys.db.entity.TblBookingReferralLetter;
import com.ccys.db.vo.doctor.patientHistory.BookingInfoVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

/**
 * Created by Mybatis Generator on 2023/12/25
 */
public interface TblBookingReferralLetterMapper extends Mapper<TblBookingReferralLetter>, MySqlMapper<TblBookingReferralLetter> {

    void deleteByBookingId(String bookingId);

    List<BookingInfoVo.Referrals> selectBookingInfoReferralLetterList(@Param("bookingId")String bookingId);

    void updateDelFlagTrueByBookingId(@Param("bookingId") String bookingId);

    /**
     *
     * @param bookingId bookingId
     * @param name tbl_Specialist_Company表的name
     * @return specialistId
     */
    String findSpecialistIdByBookingIdAndByName(@Param("bookingId") String bookingId,@Param("name") String name);

    /**
     * 一对多
     *
     * @param bookingId bookingId
     * @return
     */
    List<TblBookingReferralLetter> findByBookingId(@Param("bookingId") String bookingId);
}
